<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>模板过滤器</title>
</head>
<body>
    <div>
        小写转大写：{{ str1|upper }} <br>
        大写转小写：{{ str2|lower }} <br>
        切片操作：{{ slice_str|slice:"0:4" }} <br>
        时间格式化：{{ time_str|date:"Y-m-d H:i:s" }} <br>
    </div>
</body>
</html>